//
//  String+Category.swift
//  WeiBoSwift
//
//  Created by Jacky Sun on 16/4/28.
//  Copyright © 2016年 syf. All rights reserved.
//

import UIKit

extension String {
    
    func cachesPath() ->String
    {
        // lastPathComponent  获取完整的文件 路径 带后缀
    let path = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.CachesDirectory
,  NSSearchPathDomainMask.UserDomainMask, true).last! as NSString
    return path.stringByAppendingPathComponent((self as NSString).lastPathComponent)
    }
    
}
